package com.zmn.oms.zmn.normal.business.interfaces.work;

import com.zmn.oms.common.exception.OmsBaseException;
import com.zmn.oms.model.dto.order.zmn.ZsNormalCompensateWorkDTO;
import com.zmn.oms.model.dto.order.zmn.ZsNormalRefundWorkDTO;
import com.zmn.oms.model.dto.work.modify.must.CancelApplyDTO;
import com.zmn.oms.model.dto.work.modify.must.ZsCancelDTO;
import com.zmn.oms.model.entity.work.OrderWork;
import com.zmn.oms.model.vo.work.modify.must.ZsCancelVO;
import com.zmn.oms.model.vo.work.refund.RefundAmountVO;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 类描述：录入工单业务接口
 *
 * @author liuying
 * @date 2018/11/02 21:02
 */
public interface ZsNormalWorkBService {

    /**
     * 获取取消vo
     *
     * @param orderId
     * @param workId
     * @return
     */
    ZsCancelVO getCancelVO(Long orderId, Long workId);

    /**
     * 保存取消订单
     *
     * @param zsCancelDTO
     */
    void saveCancel(ZsCancelDTO zsCancelDTO) throws OmsBaseException;

    /**
     * 保存取消申请
     *
     * @param cancelApplyDTO
     */
    @Deprecated
    void saveCancelApply(@NotNull(message = "入参不能为空") CancelApplyDTO cancelApplyDTO) throws OmsBaseException;

    /**
     * 保存取消订单(审核不通过)
     *
     * @param zsCancelDTO
     */
    void saveUnCancel(ZsCancelDTO zsCancelDTO);

    /**
     * 获取退款列表
     *
     * @param orderWork
     * @return RefundAmountVO
     */
    List<RefundAmountVO> getRefundList(OrderWork orderWork);

    /**
     * 新增退款工单
     *
     * @param refundWorkDTO
     * @return
     */
    OrderWork insertRefundOrderWork(ZsNormalRefundWorkDTO refundWorkDTO) throws Exception;
    /**
     * 新建赔偿单
     * @param compensateWorkDTO
     * @return
     */
    OrderWork insertCompensateOrderWork(ZsNormalCompensateWorkDTO compensateWorkDTO) throws OmsBaseException;
}
